<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
</head>
<body>
</body>
<script>
  let reg = /[123456]/    //或的意思 只匹配一个
  let reg1 = /(12|34)/    //12 34整体
  let hd = '3'
  let hdd = '88888348888'
  console.log(hd.match(reg))   //['3', index: 0, input: '3', groups: undefined]
  console.log(hdd.match(reg1))  // ['34', '34', index: 5, input: '88888348888', groups: undefined]
</script>
</html>